angular.module('arduinoControl', ['ui.bootstrap']);

function ManualCtrl($scope, $http) {

	$scope.sendData = function() {
		$http({
			url : "testSerial.php",
			method : "GET",
			params : {
				data : $scope.rawData
			}
		}).success(function(data, status, header, config) {
			console.log(data);
		});

	};
}

function SoundCtrl($scope, $http) {
	
	$scope.sendSoundCode = function(code) {
		$http({
			url : "testSerial.php",
			method : "GET",
			params : {
				data : "s" + code
			}
		}).success(function(data, status, header, config) {
			console.log(data);
		});
	};
	
	$scope.Power = function() {
		$scope.sendSoundCode('a');
	};
	$scope.Input = function() {
		$scope.sendSoundCode('b');
	};
	$scope.Mute = function() {
		$scope.sendSoundCode('c');
	};
	$scope.Level = function() {
		$scope.sendSoundCode('d');
	};
	$scope.Effect = function() {
		$scope.sendSoundCode('e');
	};
	$scope.Plus = function() {
		$scope.sendSoundCode('f');
	};
	$scope.Minus = function() {
		$scope.sendSoundCode('g');
	};
}

function TelevisionCtrl($scope) {
	$scope.stuff = function() {
		return "stuff";
	};
}

function LightsCtrl($scope) {
}

function HeatCtrl($scope) {
}

function MiscCtrl($scope) {
}